﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RequestEditing.aspx.cs" Inherits="FundRaising.GUI.Extensions.RequestEditing" MasterPageFile="~/GUI/RequestMasterPage.Master" %>


<asp:Content ID="Content1" runat="server" 
    contentplaceholderid="ContentPlaceHolder1">

        <div style="background-image: url('../pic/searchbg.png'); background-repeat: no-repeat; height: 43px;" 
                        dir="rtl"> 
                        <div style="float: right; width: 30px; height: 48px;"></div>
<div style="float: right; height: 52px; width: 732px;">
 
  <table style="width: 100%;" dir="rtl">
        <tr>
            <td>
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
            <td class="style8" align="left" dir="rtl">
                            קרן :&nbsp;
                        </td>
                <td class="style7">
                    <asp:Label ID="FundLabel" runat="server" Font-Underline="True" 
                        Text="Label"></asp:Label>
                </td>
                <td class="style9" colspan="2" align="left">
                            תחום:&nbsp;
                        </td>
                <td>
                    <asp:Label ID="DomainLabel" runat="server" Font-Underline="True" Text="Label"></asp:Label>
                </td>
                <td class="style5" dir="ltr">
                    : עמותה</td>
                <td class="style6">
                    <asp:Label ID="AssoLabel" runat="server" Text="Label" 
                        style="text-decoration: underline"></asp:Label>
                </td>
            <td>
                &nbsp;</td>
        </tr>
        
    </table>
<asp:Label ID="RequestKey12" runat="server" Text="RequestKeyLabel" 
        Visible="False"></asp:Label>
  </div>
 
                    
                    </div>
    <div dir="ltr" 
        
            style="background-image: url('../pic/mainContainerBg.png'); background-repeat: no-repeat; height: 279px; width: 794px;">
    
        <table style="width: 93%; height: 71px;">
            
            <tr>
            <td>
            </td>
                <td style="width: 2296px">
                    &nbsp;</td>
                <td dir="rtl" rowspan="4" style="width: 698px">
                    <asp:DetailsView ID="DetailsView1" runat="server" Height="50px" Width="386px" 
                        AutoGenerateRows="False" CellPadding="4" DataKeyNames="RequestKey" 
                        DataSourceID="ObjectDataSource1" DefaultMode="Edit" ForeColor="#333333" 
                        BorderColor="#DEBA84" BorderWidth="1px"
                        GridLines="None" onitemupdated="DetailsView1_ItemUpdated">
                        <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                        <CommandRowStyle BackColor="#FFFFC0" Font-Bold="True" />
                        <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                        <FieldHeaderStyle BackColor="#FFFF99" Font-Bold="True" />
                        <PagerStyle BackColor="#FFCC66" ForeColor="#333333" 
                            HorizontalAlign="Center" />
                        <Fields>
                            <asp:BoundField DataField="RYear" HeaderText="RYear" SortExpression="RYear" 
                                Visible="False" />
                            <asp:BoundField DataField="AssoName" HeaderText="AssoName" 
                                SortExpression="AssoName" Visible="False" />
                            <asp:BoundField DataField="ActivetyFLD" HeaderText="ActivetyFLD" 
                                SortExpression="ActivetyFLD" Visible="False" />
                            <asp:BoundField DataField="FundName" HeaderText="FundName" 
                                SortExpression="FundName" Visible="False" />
                            <asp:BoundField DataField="ProjectFld" HeaderText="ProjectFld" 
                                SortExpression="ProjectFld" Visible="False" />
                            <asp:BoundField DataField="SubProj" HeaderText="SubProj" 
                                SortExpression="SubProj" Visible="False" />
                            <asp:BoundField DataField="ForWhat" HeaderText="עבור מה" 
                                SortExpression="ForWhat" />
                            <asp:BoundField DataField="SubmiMethod" HeaderText="שיטת שליחה" 
                                SortExpression="SubmiMethod" />
                            <asp:TemplateField HeaderText="סכום מבוקש" SortExpression="MoneyRequested">
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("MoneyRequested") %>'></asp:TextBox>
                                    &nbsp;
                                    <asp:CompareValidator ID="CompareValidator68" runat="server" 
                                        ControlToValidate="TextBox3" EnableClientScript="False" 
                                        ErrorMessage="CompareValidator" Operator="DataTypeCheck" ToolTip="שדה מספרי" 
                                        Type="Integer">?</asp:CompareValidator>
                                </EditItemTemplate>
                                <InsertItemTemplate>
                                    <asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("MoneyRequested") %>'></asp:TextBox>
                                </InsertItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="Label3" runat="server" Text='<%# Bind("MoneyRequested") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="סכום משוער" SortExpression="MoneyExpected">
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("MoneyExpected") %>'></asp:TextBox>
                                    &nbsp;
                                    <asp:CompareValidator ID="CompareValidator6ss" runat="server" 
                                        ControlToValidate="TextBox4" EnableClientScript="False" 
                                        ErrorMessage="CompareValidator" Operator="DataTypeCheck" ToolTip="שדה מספרי" 
                                        Type="Integer">?</asp:CompareValidator>
                                </EditItemTemplate>
                                <InsertItemTemplate>
                                    <asp:TextBox ID="TextBox5" runat="server" Text='<%# Bind("MoneyExpected") %>'></asp:TextBox>
                                </InsertItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="Label4" runat="server" Text='<%# Bind("MoneyExpected") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="תאריך שליחה" SortExpression="RequestSntDate">
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("RequestSntDate") %>' 
                                        Height="22px" Width="128px"></asp:TextBox>
                                    &nbsp;
                                    <asp:RegularExpressionValidator ID="RegularExpressionValidator57" 
                                        runat="server" ControlToValidate="TextBox1" ErrorMessage="תאריך לא תקין" 
                                        SetFocusOnError="True" ToolTip="dd/mm/yyyy" 
                                        ValidationExpression="([0-3][0-9].[0-1][0-9].[1-2][0-9][0-9][0-9])">?</asp:RegularExpressionValidator>
                                </EditItemTemplate>
                                <InsertItemTemplate>
                                    <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("RequestSntDate") %>'></asp:TextBox>
                                </InsertItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("RequestSntDate") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="תאריך קבלה משוער" SortExpression="DateExpected">
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("DateExpected") %>'></asp:TextBox>
                                    &nbsp;
                                    <asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server" 
                                        ControlToValidate="TextBox2" ErrorMessage="תאריך לא תקין" 
                                        SetFocusOnError="True" ToolTip="dd/mm/yyyy" 
                                        ValidationExpression="([0-3][0-9].[0-1][0-9].[1-2][0-9][0-9][0-9])">?</asp:RegularExpressionValidator>
                                </EditItemTemplate>
                                <InsertItemTemplate>
                                    <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("DateExpected") %>'></asp:TextBox>
                                </InsertItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="Label2" runat="server" Text='<%# Bind("DateExpected") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="RequestKey" HeaderText="RequestKey" 
                                SortExpression="RequestKey" ReadOnly="True" Visible="False" />
                            <asp:TemplateField HeaderText="סטטוס" SortExpression="RStatus">
                                <ItemTemplate>
                                    <asp:DropDownList ID="DropDownList2" runat="server" Height="22px" Width="134px">
                                    </asp:DropDownList>
                                </ItemTemplate>
                                <EditItemTemplate>
                                 
                                     <asp:DropDownList ID="DropDownList2" runat="server" Height="22px" 
                                                             SelectedValue='<%# Bind("RStatus") %>' Width="130px">
                                                             <asp:ListItem>בקשה נשלחה</asp:ListItem>
                                                             <asp:ListItem>בקשה נשלחה + צפי הכנה </asp:ListItem>
                                                             <asp:ListItem>ממתין - הגיע ליעד</asp:ListItem>
                                                             <asp:ListItem>חיובי - הכנסה עתידית</asp:ListItem>
                                                             <asp:ListItem>תשלום נכנס - סגור</asp:ListItem>
                                                             <asp:ListItem>שלילי</asp:ListItem>
                                                         </asp:DropDownList>
                                </EditItemTemplate>
                                <InsertItemTemplate>
                                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("RStatus") %>'></asp:TextBox>
                                </InsertItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField ShowHeader="False">
                                <ItemTemplate>
                                    <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" 
                                        CommandName="Edit" Text="עדכן"></asp:LinkButton>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True" 
                                        CommandName="Update" onclientclick="alert('עדכון התבצע בהצלחה');" Text="עדכן"></asp:LinkButton>
                                    &nbsp;<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" 
                                        CommandName="Cancel" Text=""></asp:LinkButton>
                                </EditItemTemplate>
                            </asp:TemplateField>
                        </Fields>
                        <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                        <AlternatingRowStyle BackColor="White" />
                    </asp:DetailsView>
                    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
                        OldValuesParameterFormatString="original_{0}" SelectMethod="GetRequestByKey" 
                        TypeName="FundRaising.BLL.RequestBLL" UpdateMethod="UpdateRequest">
                        <UpdateParameters>
                            <asp:Parameter Name="RYear" Type="String" />
                            <asp:Parameter Name="AssoName" Type="String" />
                            <asp:Parameter Name="ActivetyFLD" Type="String" />
                            <asp:Parameter Name="FundName" Type="String" />
                            <asp:Parameter Name="ProjectFld" Type="String" />
                            <asp:Parameter Name="SubProj" Type="String" />
                            <asp:Parameter Name="ForWhat" Type="String" />
                            <asp:Parameter Name="SubmiMethod" Type="String" />
                            <asp:Parameter Name="MoneyRequested" Type="Double" />
                            <asp:Parameter Name="MoneyExpected" Type="Double" />
                            <asp:Parameter Name="DateExpected" Type="String" />
                            <asp:Parameter Name="RequestSntDate" Type="String" />
                            <asp:Parameter Name="RStatus" Type="String" />
                            <asp:Parameter DbType="Guid" Name="Original_RequestKey" />
                        </UpdateParameters>
                    </asp:ObjectDataSource>
                </td>
                <td>
                    &nbsp;</td>
            </tr>
            
        </table>
    
</div>    
                          

</asp:Content>

